import {FormRuleUtil} from "@/utils";

export const POSITION_EDIT = {
    BODY: {
        code: null,
        description: null,
        name: null,

    },
    RULES: {
        code: FormRuleUtil.strRule("职务代码", true, 30, "abc"),
        name: FormRuleUtil.strRule("职务块名称", true, 10),
        description: FormRuleUtil.strRule("职务描述", false, 500),

    }
}

export const ORGAN_EDIT = {
    BODY: {
        code: '',
        parentCode: '',
        name: '',
        address: {adCode: '', lat: 0, lng: 0, province: '', city: '', district: '', township: '', address: ''},
        tel: '',
        sort: 50,
    },
    RULES: {
        code: FormRuleUtil.strRule('机构代码', false, 255),
        name: FormRuleUtil.strRule('机构名称', true),
        organ: {code: FormRuleUtil.strRule('机构性质', true, 400)},
        address: FormRuleUtil.addressRule('机构地址'),
        sort: FormRuleUtil.numRule('显示排序', false, 0, 9999),
    }
}

export const DEPT_EDIT = {
    BODY: {
        code: '',
        parentCode: '',
        name: '',
        address: {adCode: '', lat: 0, lng: 0, province: '', city: '', district: '', township: '', address: ''},
        tel: '',
        master: '',
        organ: {code: null},
        sort: 50,
    },
    RULES: {
        code: FormRuleUtil.strRule('部门代码', true, 30,"code2"),
        name: FormRuleUtil.strRule('部门名称', true),
        parentCode: FormRuleUtil.strRule('上级部门',true,30,"code"),
        organ: {code: FormRuleUtil.strRule('所属机构', true, 400)},
        tel: FormRuleUtil.strRule('部门电话',false,50),
        master: FormRuleUtil.strRule('部门电话',false,30),
        sort: FormRuleUtil.numRule('显示排序', false, 0, 9999),
    }
}